package com.ego.common.constant;

/**
 * @program: ego
 * @description: 商品常量及枚举
 * @author: KamTang
 * @create: 2022-11-24 10:45
 **/
public class ProductConstant {
    /**
     * 商品属性枚举
     */
    public enum AttrEnum {
        /**
         * 品牌基本属性
         * 品牌销售属性
         */
        ATTR_TYPE_BASE(1, "base", "基本属性"),
        ATTR_TYPE_SALE(0, "sale", "销售属性");

        private final int code;
        private final String msg;
        private final String desc;

        AttrEnum(int code, String msg , String desc) {
            this.code = code;
            this.msg = msg;
            this.desc = desc;
        }

        public int getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }

        public String getDesc() {
            return desc;
        }
    }

    /**
     * 商品状态枚举
     */
    public enum StatusEnum {
        /**
         * 新建、上架、下架
         */
        NEW_SPU(0, "新建"),
        ON_SALE_SPU(1, "商品上架"),
        OFF_SALE_SPU(2, "商品下架");

        private final int code;
        private final String msg;

        StatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }
    }

    /**
     * 商品活动枚举
     */
    public enum PromotionEnum {
        /**
         * 普通商品、参与活动的商品
         */
        COMMON(0, "普通商品"),
        PROMOTION(1, "活动商品");

        private final int code;
        private final String msg;

        PromotionEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public int getCode() {
            return code;
        }


        public String getMsg() {
            return msg;
        }
    }
}
